package com.yilin.tms.core.entity.user.account;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.tms.core.commons.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "user_contact")
@TableName("user_contact")
public class Contact extends BaseEntity {

    public enum ContactsType {
        delivery(0, "发货"),
        consignee(1, "收货");
        @EnumValue
        public Integer index;
        public String name;

        ContactsType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    @Column(name = "account_id")
    private String accountId; //所属用户
    @Column(name = "name")
    private String name; //联系人姓名
    @Column(name = "mobile")
    private String mobile; //联系人电话
    @Column(name = "email")
    private String email; //联系人邮箱
    @Column(name = "area_full_name")
    private String areaFullName; //区域
    @Column(name = "area_id")
    private String areaId; //联系人区域id
    @Column(name = "address")
    private String address; //联系人地址
    @Column(name = "street")
    private String street; //街道
    @Column(name = "point")
    private String point; //联系人坐标 sss,sss
    @Column(name = "contacts_type")
    private ContactsType contactsType;
    //逻辑删除 以后涉及用户的删除都走这种方式
    @TableLogic
    @Column(name = "is_deleted", columnDefinition = "INT default 0")
    private Integer isDeleted;

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAreaFullName() {
        return areaFullName;
    }

    public void setAreaFullName(String areaFullName) {
        this.areaFullName = areaFullName;
    }

    public String getAreaId() {
        return areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPoint() {
        return point;
    }

    public void setPoint(String point) {
        this.point = point;
    }

    public ContactsType getContactsType() {
        return contactsType;
    }

    public void setContactsType(ContactsType contactsType) {
        this.contactsType = contactsType;
    }
}
